"""新建客户页面"""
from page.base_page import BasePage
from selenium.webdriver.common.by import By

class NewCustomPage(BasePage):

    url = '/crm5/index.php?m=customer'

    #定位器
    # 客户名
    custom_username_locator = (By.XPATH, '//*[@id="name"]')

    # 保存
    btn_submit_locator = (By.NAME, 'submit')

    def input_custom_username(self, custom_name):
        """输入客户名"""
        self.driver.find_element(*self.custom_username_locator).send_keys(custom_name)

    def click_submit(self):
        """点击保存"""
        self.driver.find_element(*self.btn_submit_locator).click()
